/*
 * spi_drvier.h
 *
 *  Created on: 2021��5��27��
 *      Author: Administrator
 */

#ifndef SRC_SPI_SPI_DRVIER_H_
#define SRC_SPI_SPI_DRVIER_H_

#include "xil_printf.h"

#include "xparameters.h"
#include "xstatus.h"
#include "xspi_l.h"


#define HMC7044_SPI_SS    0x1
#define DAC_SPI_SS        0x2
#define ADC_SPI_SS        0x4
#define AD5682_SPI_SS     0x8


int XSpi_init();
int xSpi_trans(u32 slavedev_sel_bit, u8 *writeBufPtr, u8 *readBufPtr, u32 byte_num);

void spi_trans(u32 base_addr, u32 slavedev_sel_bit, u8 *writeBufPtr, u8 *readBufPtr, u32 byte_num, u8 CPHA_OL );

#endif /* SRC_SPI_SPI_DRVIER_H_ */
